package prueba.prueba.helpers;

import java.util.HashMap;

import prueba.prueba.TypeWords;

public class WordIso implements Comparable{

	private int id;
	public int getId() {
		return id;
	}

	private TypeWords type;	
	private HashMap<String,String> isos;
	private String md5;
	
	public WordIso(int id,HashMap<String,String> isos,TypeWords type,String md5){
		this.id = id;
		this.isos = isos;
		this.type = type;
		this.md5 = md5;
		
	}

	public int compareTo(Object another) {
		
		return 0;
	}
	
	// Seleccinar el lenguaje de origen y destino
	public String getWord() {
		
		if (isos.containsKey("es"))
				return isos.get("es");
		
		return "";
	}

	public String getMeaning(String iso) {
		
		if (isos.containsKey(iso))
			return isos.get(iso);
	
		return "";
	}

	public String getMd5() {
		// TODO Auto-generated method stub
		return md5;
	}
	
	
	/*public int compareTo(Object another) {
		
	    if(!(another instanceof WordIso)){
            throw new ClassCastException("Invalid object");
        }
       
	    WordIso another2 = ((WordIso) another);
        int num_hits = another2.num_hits;
        int num_practices = another2.num_practices;
        
        
        if (num_hits == this.num_hits && num_practices == this.num_practices)
        	return 0;
        
        else if (num_hits == this.num_hits){
        	
        	if (num_practices < this.num_practices)
        		return 1;
        	else return -1;
        
        	
        }
        else return num_hits < this.num_hits?1:-1;
	}*/
	
}
